import TradeBills from './TradeBills.vue'
import Vue from 'vue'

var TradeBillsConstructor = Vue.extend(TradeBills)
var instance

var TradeBillsJS = {
  show: function(dataList, tradeType) {
    if (!instance) {
      instance = new TradeBillsConstructor({
        el: document.createElement('div')
      })
    }
    document.body.appendChild(instance.$el)
    instance['dataList'] = dataList
    instance['tradeType'] = tradeType
    instance.show()
  }
}

export default TradeBillsJS
